package edu.colorado;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class Connect4Activity extends Activity implements OnClickListener {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        View playGame = findViewById(R.id.playGameButton);
        View instructions = findViewById(R.id.instructionsButton);
        View highScores = findViewById(R.id.highScoresButton);
        
        playGame.setOnClickListener(this);
        instructions.setOnClickListener(this);
        highScores.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.playGameButton:
            startActivity(new Intent(this, PlayGameActivity.class));
            break;
        case R.id.instructionsButton:
            startActivity(new Intent(this, InstructionsActivity.class));
            break;
        case R.id.highScoresButton:
            startActivity(new Intent(this, HighScoresActivity.class));
            break;
        }
    }
}